home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
srdemo
/
srdemo.txt
< prev
next >
Wrap
Text File
|
1995-08-26
|
12KB
|
361 lines
SRDEMO 1.1
LIB DEMO: Alphanumeric Filename Sorting
Copyright (c) 1995 by David M. Wincelberg
Table of Contents
I. Introduction ........................................... 1
II. How to Use ............................................. 2
Appendices:
A. Command Line Parameters and Switches ................... 2
B. Other FileJockey Software Products ..................... 3
C. License Agreement ...................................... 5
I. Introduction
Thank you for trying SRDEMO. It demonstrates library routines
(SRLIB) to sort long or short file names that may contain digits,
spaces, lower-case letters and/or commas within numbers. For
example, SRLIB places FILE_2 before FILE_10. It is compiled for
Microsoft C 6.0, C 7.0, VC++ 1.x and Borland TC++ 4.5 for the
small and large memory models.
To assist you in testing SRLIB, included in SRDEMO.ZIP are
list files LISTFILE and LISTFILE.W95. The latter file contains
long file names with embedded spaces and commas to simulate
Windows 95 long file names. SRDEMO can read these files and sort
the names in them in addition to or instead of reading file names
from a directory. Alternatively, you could use ZOPEN and ZDEL to
create and delete zero-size files. ZOPEN can create files from
listfiles containing file names that do not exceed the short
("8.3") DOS limit.
SRDEMO is not limited to sorting a preset number of files.
In addition, it does not read the selected directory twice --
once to count the number of files and once to store them in
array. Instead, it uses a fast approach which is documented in
SRLIB.TXT. Its source code is included in SRLIB.ZIP.
If you decide to license SRLIB, you can either GO SWREG
(#5947) on CompuServe or use the included order form. A site-
license/source-code option is also on the order form. SRDEMO is
a free program that is safe to run on a Pentium processor since
it does not perform any floating point divisions of large
numbers. It requires DOS 2.1 or higher.
Please send comments, suggestions and problem reports to me
at 71573,1023 by CompuServe e-mail, at 71573.1023@compuserve.com
by Internet e-mail, or at my postal address, even if you are not
currently a customer.
II. How to Use
Enter
SRDEMO @LISTFILE /W4 /I
to produce the listing in README.TXT. Then enter
SRDEMO @LISTFILE.W95 /W4 /I /C /A
to sort a set of long file names without regard to case, commas
or spaces. The switch /W4 produces a wide display of no more
than four file names per line, /I selects ignoring case, /C picks
ignoring commas and /A chooses ignoring spaces. See Appendix A
for a complete list of the command-line switches. To create
another list file, use a text editor to place one file name at
the beginning of each line. Don't worry about blank lines.
SRDEMO ignores them.
Alternatively, you may use ZOPEN and ZDEL to create and
delete zero-size files with short names. SRDEMO can sort a
mixture of names read from directories and list files.
Appendices
A. Command Line Parameters and Switches
A.1. SRDEMO: Demonstrates Alphanumeric Filename Sorting
Entering
SRDEMO /?
produces the following summary of command line parameters and
switches:
SRDEMO [switches] [pattern ...] [@listfile ...]
pattern Filename pattern (default is *.* if no listfile)
listfile File containing names to simulate
/I Use case-insensitive comparisons
/A Ignore all spaces (outside of numbers)
/M Ignore multiple spaces (outside of numbers)
/C Ignore commas in numbers
/P Pause after each screen of information
/W Use wide display -- 5 names per line
/W4 Use wide display -- 4 names per line
Page 2
The names in a listfile can be up to 78 characters long. The /W4
switch produces a display that can be included in a memo without
re-formatting.
A.2. ZOPEN: Creates a single or set of zero-size files
Entering
ZOPEN /?
produces the following summary of command line parameters:
ZOPEN { filename | @listfile }
filename A single file name
listfile Name of a file containing a list of files to
create, one file name per line
The braces and vertical bar (|) mean that you must choose to
create either a single short file name or tell the program where
to find a list of short file names. Note that you must precede
the list-file name with the at-sign (@).
A.3. ZDEL: Deletes zero-size files
Entering
ZDEL /?
produces the following summary of command line parameters:
ZDEL [drive:][directory]pattern
pattern A file name or a wildcard pattern
This parameter is self-explanatory.
B. Other FileJockey Software Products
Following is a list of current FileJockey Software products. All
of the compressed files for these products have extension ZIP.
In parentheses after the descriptions are the locations where the
programs may be found on CompuServe and the registration/license
fees.
B.1. System Tools
WRDGRB 1.1 -- Copies Words From DOS Screen to Command Line:
Page 3
No more typing words you see on the DOS screen! With WRDGRB
installed, you simply press the hot-key sequence, highlight text
with your mouse, and left click to copy it to the command line
(or right click to cancel). WRDGRB even connects a filename to
its extension when both are highlighted in a directory listing.
New: smaller by 19K, a default-values file, and more. 23K TSR.
No known bugs. GO SWREG (#5571) to register on-line. (GO
PCUTIL, Library 3, $35)
LISTRS 1.2 -- Directory/Program List Makers With Action Options:
DIRLIST: More accurate than "dir *." Options include show files,
change to and remove directory. PROGLIST: Shows current
directory's .EXE, .COM and .BAT files in one listing to help
users find the name of the program file to run. Options include
type & run, type & wait and edit .BAT files with a user-selected
editor. Both programs correctly sort numbers within filenames.
No known bugs. (GO PCUTIL, Library 5, $15)
B.2. Programmer Tool
PROGCR 1.0 -- Prepares Programs for Copyrighting:
Protects the privacy of your C/C++ or PASCAL source code
copyright deposit by removing comments after each file's header
(which should primarily consist of your copyright notice) from
copies of the original files. Also, copies words displayed by
standard or user-specified print commands to a file for spell
checking. (GO PCPROG, Library 6, $10)
B.3. BBS-Session Tools
CFWRAP 1.1 -- Word Wrapping Tuned for BBS Capture Files:
Prepares BBS capture files for editing by removing page pause
lines ("Press <CR> for more !", etc.) and word-wrapping various
types of paragraphs (including each line starting with ">>" and